﻿@model SummaryModel
@using SpotsHub.Gateway.Models.Customer;
@{
    ViewBag.Title = "Payment Confirmation";
    // +string+
    
    //This page uses on Register & Renew
}


<div class="window paymentinfo">
    <div class="window-title grad-lightgrey grad">
        <div class="window-title-bar grad-titleshine grad">
            <h2>Confirmation</h2>
        </div>
    </div>
    <div class="window-content space">
        @if (Model.Address.Company != null)
        {
            <h3>
                @Html.DisplayFor(model => model.Address.Company)
            </h3>
        }
        <div class="window-left">
            <div class="detail-line">
                <strong>
                    @Html.DisplayFor(model => model.Address.FirstName)
                    @Html.DisplayFor(model => model.Address.LastName)
                </strong>
            </div>
            <div class="detail-line">
                <div>
                    @Html.DisplayFor(model => model.Address.Address1)
                </div>
                <div>
                    @Html.DisplayFor(model => model.Address.Address2)
                </div>
            </div>
            <div class="detail-line">
                @Html.DisplayFor(model => model.Address.City),
                @Html.DisplayFor(model => model.Address.StateProvinceName)
                @Html.DisplayFor(model => model.Address.ZipPostalCode)
            </div>
            <div class="detail-line">
                @Html.DisplayFor(model => model.Address.CountryName)
            </div>
        </div>
        <div class="window-left">
            <div class="detail-line">
                @if (Model.Address.CellPhoneNumber != null)
                {
                    <div>
                        Cell phone: @Html.DisplayFor(model => model.Address.CellPhoneNumber)
                    </div>
                }
                @if (Model.Address.PhoneNumber != null)
                {
                    <div>
                        Secondary phone: @Html.DisplayFor(model => model.Address.PhoneNumber)
                    </div>
                }
            </div>
            <div class="detail-line">
                Email: @Html.DisplayFor(model => model.Address.Email)
            </div>
            <div class="detail-line">
                Password: **********
            </div>
        </div>
        <div class="content-clear"></div>
    </div>
</div>

<div class="window confirm-payment">
    <div class="window-title grad-lightgrey grad">
        <div class="window-title-bar grad-titleshine grad">
            <h2>Subscription Information</h2>
        </div>
    </div>
    <div class="window-content space">
        <div class="window-left">
            <div class="detail-line">
                <strong>@Model.MembershipInfo</strong>
            </div>
            <div class="detail-line">
                <table>
                    <tbody>
                        <tr><td class="confirm-item"><strong>Subtotal:</strong></td><td class="confirm-charge"><span>$@Model.Subtotal.ToString("F2")</span></td></tr>
                        <tr><td class="confirm-item"><strong>5% GST:</strong></td><td class="confirm-charge"><span>$@Model.Tax.ToString("F2")</span></td></tr>
                        <tr class="confirm-total"><td class="confirm-item"><strong>Total:</strong></td><td class="confirm-charge"><span>$@Model.Total.ToString("F2")</span><img alt="This order is paid." style="margin-top: -10px; vertical-align: middle; height: 50px; margin-left: 25px;" src="/Content/images/paid-icon.jpg" /></td></tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="window-right">
            <div class="hub-expiry">Membership Expires in @Model.ExpireDays Days.</div>
        </div>

    </div>
    <div class="content-clear"></div>
</div>

<div class="payment-windows">

    <div class="window window-left">
        <div class="window-title grad-lightgrey grad">
            <div class="window-title-bar grad-titleshine grad">
                <h2>Billing Address</h2>
            </div>
        </div>
        <div class="window-content space">
            @if (Model.BillingAddress != null)
            {
                if (Model.BillingAddress.Company != null)
                {
                    <div class="detail-line">
                        <strong>
                            @Html.DisplayFor(model => model.BillingAddress.Company)
                        </strong>
                    </div>
                }
                <div class="detail-line">
                    <strong>
                        @Html.DisplayFor(model => model.BillingAddress.FirstName)
                        @Html.DisplayFor(model => model.BillingAddress.LastName)
                    </strong>
                </div>
                <div class="detail-line">
                    <div>
                        @Html.DisplayFor(model => model.BillingAddress.Address1)
                    </div>
                    @if(Model.BillingAddress.Address2 != null)
                    {
                    <div>
                        @Html.DisplayFor(model => model.BillingAddress.Address2)
                    </div>
                    }
                </div>
                <div class="detail-line">
                    @Html.DisplayFor(model => model.BillingAddress.City),
                    @Html.DisplayFor(model => model.BillingAddress.StateProvinceName)
                    @Html.DisplayFor(model => model.BillingAddress.ZipPostalCode)
                </div>
                <div class="detail-line">
                    @Html.DisplayFor(model => model.BillingAddress.CountryName)
                </div>
                <div class="detail-line">
                    @if (Model.BillingAddress.CellPhoneNumber != null)
                    {
                        <div>
                            Cell phone: @Model.BillingAddress.CellPhoneNumber
                        </div>
                    }
                    @if (Model.BillingAddress.PhoneNumber != null)
                    {
                        <div>
                            Secondary phone: @Model.BillingAddress.PhoneNumber
                        </div>
                    }
                </div>
            }
            else
            {
                <div>Billing Address is not set.</div>
            }
        </div>
    </div>

    <div class="window window-right">
        <div class="window-title grad-lightgrey grad">
            <div class="window-title-bar grad-titleshine grad">
                <h2>Credit Card Information</h2>
            </div>
        </div>
        <div class="window-content space">
            <div>
                Card Holder:
                @Model.PaymentInfo.UserName
            </div>
            <div>
                Card Type:
                @Model.PaymentInfo.CardType
            </div>
            <div>
                Card Number:
                @Model.PaymentInfo.CardNumber
            </div>

            <div>
                Expiry:
                @Model.PaymentInfo.ExpMonth / @Model.PaymentInfo.ExpYear
            </div>
            
        </div>
        <div class="content-clear"></div>
    </div>
</div>
<div class="confirmend-buttons">
    @Html.ActionLink("Go to My HUB", "Info", "Customer", new { area = "" }, new { @class = "button-red" })
    <div class="content-clear"></div>
</div>